-- GENERATED SPELL FOR [Farahlon Lasher] --


function spell0_20774(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(12747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20774', 11500, 1)
end

function spell1_20774(pUnit, Event) --@Flanking Growth,n/a--
pUnit:FullCastSpellOnTarget(36604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20774', 500, 1)
end

function spell2_20774(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(3019,pUnit)
pUnit:RegisterEvent('Sorts_20774', 15000, 1)
end

function Sorts_20774(pUnit, Event)
local choix_sorts_20774 = math.random(0, 2)
if choix_sorts_20774 == 0 then
pUnit:RegisterEvent('spell0_20774', 1, 1)
end
if choix_sorts_20774 == 1 then
pUnit:RegisterEvent('spell1_20774', 1, 1)
end
if choix_sorts_20774 == 2 then
pUnit:RegisterEvent('spell2_20774', 1, 1)
end
end

function mob20774_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20774', math.random(1500, 3000), 1)
end

function mob20774_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20774_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20774_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20774, 1, 'mob20774_Action')
RegisterUnitEvent(20774, 2, 'mob20774_Leave')
RegisterUnitEvent(20774, 3, 'mob20774_Kill')
RegisterUnitEvent(20774, 4, 'mob20774_Die')
